package com.everlo.ServletKits;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Demo001 extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		for(int i=1;i<=9;i++){
			for(int j=1;j<=i;j++){
				if(j==i){
					response.getWriter().write(i+"*"+j+"="+(i*j)+"\n");
				}
				else{
					response.getWriter().write(i+"*"+j+"="+(i*j)+"\t");
				}
			}
		}
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}

}
